<template>
  <p>Child - {{ name }} - {{ age }}</p>
</template>

<script>
export default {
  name: "Child",
  props: ["name", "age"],
  mounted() {
    console.log(this.$attrs.sex);
  },
  inheritAttrs: false, // 让$attrs不显示在元素上
};
</script>

<style>
</style>